Integrand size = 31, antiderivative size = 236 \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=-\frac {B (b c-a d) h \left (a^2 d^2 h^2-a b d h (4 d g-c h)+b^2 \left (6 d^2 g^2-4 c d g h+c^2 h^2\right )\right ) n x}{4 b^3 d^3}-\frac {B (b c-a d) h^2 (4 b d g-b c h-a d h) n x^2}{8 b^2 d^2}-\frac {B (b c-a d) h^3 n x^3}{12 b d}-\frac {B (b g-a h)^4 n \log (a+b x)}{4 b^4 h}+\frac {B (d g-c h)^4 n \log (c+d x)}{4 d^4 h}+\frac {(g+h x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{4 h} \]
[Out]
Time = 0.20 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 84} \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=-\frac {B h n x (b c-a d) \left (a^2 d^2 h^2-a b d h (4 d g-c h)+b^2 \left (c^2 h^2-4 c d g h+6 d^2 g^2\right )\right )}{4 b^3 d^3}+\frac {(g+h x)^4 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{4 h}-\frac {B n (b g-a h)^4 \log (a+b x)}{4 b^4 h}-\frac {B h^2 n x^2 (b c-a d) (-a d h-b c h+4 b d g)}{8 b^2 d^2}-\frac {B h^3 n x^3 (b c-a d)}{12 b d}+\frac {B n (d g-c h)^4 \log (c+d x)}{4 d^4 h} \]
[In]
[Out]
Rule 84
Rule 2548
Rubi steps \begin{align*} \text {integral}& = \frac {(g+h x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{4 h}-\frac {(B (b c-a d) n) \int \frac {(g+h x)^4}{(a+b x) (c+d x)} \, dx}{4 h} \\ & = \frac {(g+h x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{4 h}-\frac {(B (b c-a d) n) \int \left (\frac {h^2 \left (a^2 d^2 h^2-a b d h (4 d g-c h)+b^2 \left (6 d^2 g^2-4 c d g h+c^2 h^2\right )\right )}{b^3 d^3}+\frac {h^3 (4 b d g-b c h-a d h) x}{b^2 d^2}+\frac {h^4 x^2}{b d}+\frac {(b g-a h)^4}{b^3 (b c-a d) (a+b x)}+\frac {(d g-c h)^4}{d^3 (-b c+a d) (c+d x)}\right ) \, dx}{4 h} \\ & = -\frac {B (b c-a d) h \left (a^2 d^2 h^2-a b d h (4 d g-c h)+b^2 \left (6 d^2 g^2-4 c d g h+c^2 h^2\right )\right ) n x}{4 b^3 d^3}-\frac {B (b c-a d) h^2 (4 b d g-b c h-a d h) n x^2}{8 b^2 d^2}-\frac {B (b c-a d) h^3 n x^3}{12 b d}-\frac {B (b g-a h)^4 n \log (a+b x)}{4 b^4 h}+\frac {B (d g-c h)^4 n \log (c+d x)}{4 d^4 h}+\frac {(g+h x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{4 h} \\ \end{align*}
Time = 0.39 (sec) , antiderivative size = 314, normalized size of antiderivative = 1.33 \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {b d x \left (6 A b^3 d^3 \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right )-B (b c-a d) h n \left (6 a^2 d^2 h^2-3 a b d h (8 d g-2 c h+d h x)+b^2 \left (6 c^2 h^2-3 c d h (8 g+h x)+2 d^2 \left (18 g^2+6 g h x+h^2 x^2\right )\right )\right )\right )-6 a^2 B d^4 h \left (6 b^2 g^2-4 a b g h+a^2 h^2\right ) n \log (a+b x)+6 b^3 B \left (4 a d^4 g^3+b c \left (-4 d^3 g^3+6 c d^2 g^2 h-4 c^2 d g h^2+c^3 h^3\right )\right ) n \log (c+d x)+6 b^3 B d^4 \left (4 a g^3+b x \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right )\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{24 b^4 d^4} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(983\) vs. \(2(224)=448\).
Time = 33.09 (sec) , antiderivative size = 984, normalized size of antiderivative = 4.17
method | result | size |
parallelrisch | \(\frac {12 B \,a^{2} b^{2} c \,d^{3} g \,h^{2} n^{2}-12 B a \,b^{3} c^{2} d^{2} g \,h^{2} n^{2}-36 A a \,b^{3} c \,d^{3} g^{2} h n -6 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} c^{4} h^{3} n +24 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} c^{3} d g \,h^{2} n -36 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} c^{2} d^{2} g^{2} h n +24 B \,x^{3} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} d^{4} g \,h^{2} n +36 B \,x^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} d^{4} g^{2} h n -12 B \,x^{2} b^{4} c \,d^{3} g \,h^{2} n^{2}+6 A \,x^{4} b^{4} d^{4} h^{3} n +24 A x \,b^{4} d^{4} g^{3} n -6 B \ln \left (b x +a \right ) a^{4} d^{4} h^{3} n^{2}+6 B \ln \left (b x +a \right ) b^{4} c^{4} h^{3} n^{2}-24 A a \,b^{3} d^{4} g^{3} n -24 A \,b^{4} c \,d^{3} g^{3} n -24 B x \,a^{2} b^{2} d^{4} g \,h^{2} n^{2}+36 B x a \,b^{3} d^{4} g^{2} h \,n^{2}+24 B x \,b^{4} c^{2} d^{2} g \,h^{2} n^{2}-36 B x \,b^{4} c \,d^{3} g^{2} h \,n^{2}+24 B \ln \left (b x +a \right ) a^{3} b \,d^{4} g \,h^{2} n^{2}-36 B \ln \left (b x +a \right ) a^{2} b^{2} d^{4} g^{2} h \,n^{2}-24 B \ln \left (b x +a \right ) b^{4} c^{3} d g \,h^{2} n^{2}+36 B \ln \left (b x +a \right ) b^{4} c^{2} d^{2} g^{2} h \,n^{2}+12 B \,x^{2} a \,b^{3} d^{4} g \,h^{2} n^{2}+2 B \,x^{3} a \,b^{3} d^{4} h^{3} n^{2}-2 B \,x^{3} b^{4} c \,d^{3} h^{3} n^{2}+24 A \,x^{3} b^{4} d^{4} g \,h^{2} n -3 B \,x^{2} a^{2} b^{2} d^{4} h^{3} n^{2}+3 B \,x^{2} b^{4} c^{2} d^{2} h^{3} n^{2}+36 A \,x^{2} b^{4} d^{4} g^{2} h n +24 B \ln \left (b x +a \right ) a \,b^{3} d^{4} g^{3} n^{2}+6 B x \,a^{3} b \,d^{4} h^{3} n^{2}-6 B x \,b^{4} c^{3} d \,h^{3} n^{2}-24 B \ln \left (b x +a \right ) b^{4} c \,d^{3} g^{3} n^{2}-6 B \,a^{4} d^{4} h^{3} n^{2}+6 B \,b^{4} c^{4} h^{3} n^{2}-3 B \,a^{3} b c \,d^{3} h^{3} n^{2}+24 B \,a^{3} b \,d^{4} g \,h^{2} n^{2}-36 B \,a^{2} b^{2} d^{4} g^{2} h \,n^{2}+3 B a \,b^{3} c^{3} d \,h^{3} n^{2}-24 B \,b^{4} c^{3} d g \,h^{2} n^{2}+36 B \,b^{4} c^{2} d^{2} g^{2} h \,n^{2}+6 B \,x^{4} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} d^{4} h^{3} n +24 B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} d^{4} g^{3} n +24 B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{4} c \,d^{3} g^{3} n}{24 b^{4} d^{4} n}\) | \(984\) |
risch | \(\text {Expression too large to display}\) | \(2000\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 571 vs. \(2 (224) = 448\).
Time = 0.32 (sec) , antiderivative size = 571, normalized size of antiderivative = 2.42 \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {6 \, A b^{4} d^{4} h^{3} x^{4} + 2 \, {\left (12 \, A b^{4} d^{4} g h^{2} - {\left (B b^{4} c d^{3} - B a b^{3} d^{4}\right )} h^{3} n\right )} x^{3} + 3 \, {\left (12 \, A b^{4} d^{4} g^{2} h - {\left (4 \, {\left (B b^{4} c d^{3} - B a b^{3} d^{4}\right )} g h^{2} - {\left (B b^{4} c^{2} d^{2} - B a^{2} b^{2} d^{4}\right )} h^{3}\right )} n\right )} x^{2} + 6 \, {\left (4 \, A b^{4} d^{4} g^{3} - {\left (6 \, {\left (B b^{4} c d^{3} - B a b^{3} d^{4}\right )} g^{2} h - 4 \, {\left (B b^{4} c^{2} d^{2} - B a^{2} b^{2} d^{4}\right )} g h^{2} + {\left (B b^{4} c^{3} d - B a^{3} b d^{4}\right )} h^{3}\right )} n\right )} x + 6 \, {\left (B b^{4} d^{4} h^{3} n x^{4} + 4 \, B b^{4} d^{4} g h^{2} n x^{3} + 6 \, B b^{4} d^{4} g^{2} h n x^{2} + 4 \, B b^{4} d^{4} g^{3} n x + {\left (4 \, B a b^{3} d^{4} g^{3} - 6 \, B a^{2} b^{2} d^{4} g^{2} h + 4 \, B a^{3} b d^{4} g h^{2} - B a^{4} d^{4} h^{3}\right )} n\right )} \log \left (b x + a\right ) - 6 \, {\left (B b^{4} d^{4} h^{3} n x^{4} + 4 \, B b^{4} d^{4} g h^{2} n x^{3} + 6 \, B b^{4} d^{4} g^{2} h n x^{2} + 4 \, B b^{4} d^{4} g^{3} n x + {\left (4 \, B b^{4} c d^{3} g^{3} - 6 \, B b^{4} c^{2} d^{2} g^{2} h + 4 \, B b^{4} c^{3} d g h^{2} - B b^{4} c^{4} h^{3}\right )} n\right )} \log \left (d x + c\right ) + 6 \, {\left (B b^{4} d^{4} h^{3} x^{4} + 4 \, B b^{4} d^{4} g h^{2} x^{3} + 6 \, B b^{4} d^{4} g^{2} h x^{2} + 4 \, B b^{4} d^{4} g^{3} x\right )} \log \left (e\right )}{24 \, b^{4} d^{4}} \]
[In]
[Out]
Exception generated. \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\text {Exception raised: HeuristicGCDFailed} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 467 vs. \(2 (224) = 448\).
Time = 0.22 (sec) , antiderivative size = 467, normalized size of antiderivative = 1.98 \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\frac {1}{4} \, B h^{3} x^{4} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{4} \, A h^{3} x^{4} + B g h^{2} x^{3} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A g h^{2} x^{3} + \frac {3}{2} \, B g^{2} h x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {3}{2} \, A g^{2} h x^{2} + B g^{3} x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A g^{3} x + \frac {{\left (\frac {a e n \log \left (b x + a\right )}{b} - \frac {c e n \log \left (d x + c\right )}{d}\right )} B g^{3}}{e} - \frac {3 \, {\left (\frac {a^{2} e n \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} e n \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c e n - a d e n\right )} x}{b d}\right )} B g^{2} h}{2 \, e} + \frac {{\left (\frac {2 \, a^{3} e n \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} e n \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d e n - a b d^{2} e n\right )} x^{2} - 2 \, {\left (b^{2} c^{2} e n - a^{2} d^{2} e n\right )} x}{b^{2} d^{2}}\right )} B g h^{2}}{2 \, e} - \frac {{\left (\frac {6 \, a^{4} e n \log \left (b x + a\right )}{b^{4}} - \frac {6 \, c^{4} e n \log \left (d x + c\right )}{d^{4}} + \frac {2 \, {\left (b^{3} c d^{2} e n - a b^{2} d^{3} e n\right )} x^{3} - 3 \, {\left (b^{3} c^{2} d e n - a^{2} b d^{3} e n\right )} x^{2} + 6 \, {\left (b^{3} c^{3} e n - a^{3} d^{3} e n\right )} x}{b^{3} d^{3}}\right )} B h^{3}}{24 \, e} \]
[In]
[Out]
Timed out. \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=\text {Timed out} \]
[In]
[Out]
Time = 1.49 (sec) , antiderivative size = 767, normalized size of antiderivative = 3.25 \[ \int (g+h x)^3 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx=x\,\left (\frac {4\,A\,b\,d\,g^3+12\,A\,a\,c\,g\,h^2+12\,A\,a\,d\,g^2\,h+12\,A\,b\,c\,g^2\,h+6\,B\,a\,d\,g^2\,h\,n-6\,B\,b\,c\,g^2\,h\,n}{4\,b\,d}+\frac {\left (4\,a\,d+4\,b\,c\right )\,\left (\frac {\left (\frac {4\,A\,a\,d\,h^3+4\,A\,b\,c\,h^3+12\,A\,b\,d\,g\,h^2+B\,a\,d\,h^3\,n-B\,b\,c\,h^3\,n}{4\,b\,d}-\frac {A\,h^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,b\,d}\right )\,\left (4\,a\,d+4\,b\,c\right )}{4\,b\,d}-\frac {4\,A\,a\,c\,h^3+12\,A\,a\,d\,g\,h^2+12\,A\,b\,c\,g\,h^2+12\,A\,b\,d\,g^2\,h+4\,B\,a\,d\,g\,h^2\,n-4\,B\,b\,c\,g\,h^2\,n}{4\,b\,d}+\frac {A\,a\,c\,h^3}{b\,d}\right )}{4\,b\,d}-\frac {a\,c\,\left (\frac {4\,A\,a\,d\,h^3+4\,A\,b\,c\,h^3+12\,A\,b\,d\,g\,h^2+B\,a\,d\,h^3\,n-B\,b\,c\,h^3\,n}{4\,b\,d}-\frac {A\,h^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,b\,d}\right )}{b\,d}\right )+\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (B\,g^3\,x+\frac {3\,B\,g^2\,h\,x^2}{2}+B\,g\,h^2\,x^3+\frac {B\,h^3\,x^4}{4}\right )-x^2\,\left (\frac {\left (\frac {4\,A\,a\,d\,h^3+4\,A\,b\,c\,h^3+12\,A\,b\,d\,g\,h^2+B\,a\,d\,h^3\,n-B\,b\,c\,h^3\,n}{4\,b\,d}-\frac {A\,h^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,b\,d}\right )\,\left (4\,a\,d+4\,b\,c\right )}{8\,b\,d}-\frac {4\,A\,a\,c\,h^3+12\,A\,a\,d\,g\,h^2+12\,A\,b\,c\,g\,h^2+12\,A\,b\,d\,g^2\,h+4\,B\,a\,d\,g\,h^2\,n-4\,B\,b\,c\,g\,h^2\,n}{8\,b\,d}+\frac {A\,a\,c\,h^3}{2\,b\,d}\right )+x^3\,\left (\frac {4\,A\,a\,d\,h^3+4\,A\,b\,c\,h^3+12\,A\,b\,d\,g\,h^2+B\,a\,d\,h^3\,n-B\,b\,c\,h^3\,n}{12\,b\,d}-\frac {A\,h^3\,\left (4\,a\,d+4\,b\,c\right )}{12\,b\,d}\right )+\frac {A\,h^3\,x^4}{4}-\frac {\ln \left (a+b\,x\right )\,\left (B\,n\,a^4\,h^3-4\,B\,n\,a^3\,b\,g\,h^2+6\,B\,n\,a^2\,b^2\,g^2\,h-4\,B\,n\,a\,b^3\,g^3\right )}{4\,b^4}+\frac {\ln \left (c+d\,x\right )\,\left (B\,n\,c^4\,h^3-4\,B\,n\,c^3\,d\,g\,h^2+6\,B\,n\,c^2\,d^2\,g^2\,h-4\,B\,n\,c\,d^3\,g^3\right )}{4\,d^4} \]
[In]
[Out]